//
//  EAGLView.h
//  DrawColorPolygon
//
//  Created by 畑圭輔 on 10/03/07.
//  Copyright Keisuke Hata 2010. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>

#import "ESRenderer.h"

@interface EAGLView : UIView
{    
@private
	id <ESRenderer> renderer;
	
	BOOL animating;
	BOOL displayLinkSupported;
	NSInteger animationFrameInterval;
	
	// iPhone OS3.1から利用できるDisplayLinkについて
	id			displayLink;
    NSTimer		*animationTimer;
	
	// 表示スタイル
	int			_polyStyle;
	int			_lineStyle;
}

@property (readonly, nonatomic, getter=isAnimating) BOOL animating;
@property (nonatomic) NSInteger animationFrameInterval;

// 表示スタイル
@property (nonatomic, readwrite) int polyStyle;
@property (nonatomic, readwrite) int lineStyle;

- (void) startAnimation;
- (void) stopAnimation;
- (void) drawView:(id)sender;

// 更新メソッド
- (void) updateAnimation;
- (void) updateLineWidth : (int)width;

@end
